/**
 * 
 */
package com.googlecode.dynargs.model.constraints.validation;

/**
 * @author Federico De Faveri defaveri@gmail.com
 *
 */
public class Size extends ValidationConstraint {

	protected int min;
	protected int max;
	
	public Size(String message, int min, int max) {
		super(javax.validation.constraints.Size.class, ValidationConstraintType.SIZE, message);
		this.min = min;
		this.max = max;
	}

	/**
	 * @return the min
	 */
	public int getMin() {
		return min;
	}

	/**
	 * @return the max
	 */
	public int getMax() {
		return max;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Size [min=");
		builder.append(min);
		builder.append(", max=");
		builder.append(max);
		builder.append("]");
		return builder.toString();
	}
}
